package com;

import com.util.RabbitmqUtils;

import java.util.concurrent.TimeUnit;

public class ProducerApp {
    public static void main(String[] args) {
        try {
            String message = "dll";
            for (int i = 1; i <= 20; i++) {
                RabbitmqUtils.send("test2", false, false,
                        false, null, message + i);
                System.out.println("发送消息：" + message + i);
                TimeUnit.SECONDS.sleep(1);
            }
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
